Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mustache Escaping Flag #180

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stellarpower
Copy link

Add boolean parameter to mustache to control whether escaping of special characters is performed or not.

I am working with plain files, YAML, etc., and the HTML escaping that the Mustache_Engine is set up with causes problems here.

It might be desirable to expose further finetuning instead of making it a boolean, leave that up to you.

I've done basic tests but not written any testcases etc.

@@ -12,12 +12,19 @@
* Returns the resulting string.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its not necessary to update the docs/ markdown files, can you instead add the changes to this doc comment, I use these to generate the markdown files on each release.

@@ -614,9 +614,11 @@ This function has been removed. The dependency that makes this function work is
You can continue using the function by manually installing the [`files_scripts_deprecated`](https://github.com/Raudius/files_scripts_deprecated) app, which bundles all the removed functions.
### mustache

`mustache(String template, [Table variables]={}): String`
`mustache(String template, [Table variables]={}, [Bool escape]=true): String`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value is actually false

Also see other change request; you should leave this file unchanged and just make the docs changes directly in the class file comment.

Copy link
Author

@stellarpower stellarpower Oct 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yep, I think copilot did that and I uncommitted and recommitted. Maybe my force push didn't go through, I hate git. But it should default to true to preserve existing behaviour. Anyway, only added a couple of lines so feel free to add it in your master branch however you want if it's something you'd like to add :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants